Presently, mobile phones or portable electronic devices such as PDAs, navigators, etc., are usually connected to chargers or PC devices via USB interfaces. FIG. 1 is a schematic diagram of a circuit structure of an electronic device utilizing the USB interface of the prior art. As shown in FIG. 1, the electronic device 100 communicates and connects to a charger 109 via a USB interface 102. The USB interface 102 usually comprises four lines: a power line 101 (VBus), a ground line 103, a DP signal transmission line 105, and a DN signal transmission line 107. The power line 101 and the ground line 103 are used for supplying power to electronic devices when the electronic devices are coupled to the charger 109 via the USB interface 102. Detailed operations of the USB interface are well-known to those skilled in the art and are therefore omitted herein.
FIG. 2 is a schematic diagram of an electronic device coupled to a PC device or a charger. As shown in FIG. 2, the electronic device 100, a mobile phone in the example, may be coupled to a PC device 205 or the charger 109 via the USB interface 102. The two ends of the USB interface 102 may be plugs of different specifications, for example, one end is USB plug 209 (Mini A USB) while the other end is USB plug 211 (Type A USB), or plugs of the same specification, i.e. both are Mini A USB or both are Type A USB. The USB plug 209 is utilized for connecting to the electronic device 100, while the USB plug 211 is utilized for connecting to the PC device 205 or the charger 109, thus, a mechanism is needed for distinguishing whether the electronic device 100 is coupled to the PC device 205 or the charger 109. With reference again to FIG. 1, and taking a conventional charger as an example, a detection circuit 111 is usually added to the charger 109 for assisting the electronic device 100 using the USB interface 102 to distinguish whether the electronic device 100 is coupled to a PC device or to a charger. That is to say, additional designs for circuits are needed, which results in not only increase of costs, but also inconvenience for users, because electronic devices produced by different companies can not share the same detection circuit in the charger.